#include "stdafx.h"
#include "poke_dialog_helper.h"

void
ShowTabDialog(CTabCtrl &oTabCtrl, CDialog &oTabDlg)
{
    CRect oTabItemRect, oTabRect;
    oTabCtrl.GetItemRect(0, &oTabItemRect);
    oTabCtrl.GetClientRect(&oTabRect);
    oTabDlg.SetWindowPos(NULL,
        1,
        oTabItemRect.Height() + 3,
        oTabRect.Width() - 5,
        oTabRect.Height() - oTabItemRect.Height() - 5,
        SWP_SHOWWINDOW | SWP_NOZORDER);
}

void
HideTabDialog(CDialog &oTabDlg)
{
    oTabDlg.SetWindowPos(NULL,
        0, 0, 0, 0,
        SWP_HIDEWINDOW | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
